﻿using Acl.ComponentModel.Annotions;

using System;

namespace Acl.Modular
{
    /// <summary>
    /// 模块注解类
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    [MetadataAttributeAttribute]
    public class ModuleAttribute : Attribute
    {
        /// <summary>
        ///
        /// </summary>
        public ModuleAttribute()
        { }

        /// <summary>
        ///
        /// </summary>
        /// <param name="moduleName"></param>
        /// <param name="startLevel"></param>
        public ModuleAttribute(string moduleName, uint startLevel = 6)
        {
            Name = moduleName;
            StartLevel = startLevel;
        }

        /// <summary>
        /// 得到或设置模块名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 启动级别，缺省值：6，级别越小启动的优先级越高
        /// </summary>
        public uint StartLevel { get; set; } = 6;

        /// <summary>
        /// 作者
        /// </summary>
        public string Author { get; set; }

        /// <summary>
        /// 版本
        /// </summary>
        public string Version { get; set; }
    }
}